import { createRouter, createWebHashHistory } from 'vue-router';

export default createRouter({
    history: createWebHashHistory(), // hash模式：createWebHashHistory，history模式：createWebHistory
    routes: [
      
        {
            path: '/',
            redirect: '/introduce'
        },
        {
            path: '/introduce',
            name: 'introduce',
            component: () => import('../view/Introduce.vue')
        },
        {
            path: '/login',
            name: 'login',
            component: () => import('../view/Login.vue')
        },
        {
            path: '/dashboard',
            name: 'dashboard',
            component: () => import('../view/Dashboard.vue')
        },
        {
            path: '/add',
            name: 'add',
            component: () => import('../view/Add.vue')
        },
        {
            path: '/good',
            name: 'good',
            component: () => import('../view/Good.vue')
        },
        {
          path: '/swiper',
          name: 'swiper',
          component: () => import(/* webpackChunkName: "swiper" */ '../view/Swiper.vue')
        },
        {
          path: '/hot',
          name: 'hot',
          component: () => import(/* webpackChunkName: "hot" */ '../view/IndexConfig.vue')
        },
        {
          path: '/new',
          name: 'new',
          component: () => import(/* webpackChunkName: "new" */ '../view/IndexConfig.vue')
        },
        {
          path: '/recommend',
          name: 'recommend',
          component: () => import(/* webpackChunkName: "recommend" */ '../view/IndexConfig.vue')
        },
    ]
})